package main

import (
	"fmt"
	"os"
)

var ping = [12]int{31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}
var run = [12]int{31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}

func main() {
	var week [7]int
	var diff [13]int
	week[0] = 1
	var init = 0
	for {
		for idx := range ping {
			yuan := init
			init += (ping[idx] % 7)
			init = init % 7
			diff[yuan-init+6] = 1
			if checkmonth(diff) {
				print("okokokokok")
				os.Exit(0)
			}
		}

		for idx := range ping {
			yuan := init
			init += (ping[idx] % 7)
			init = init % 7
			diff[yuan-init+6] = 1
			if checkmonth(diff) {
				print("okokokokok")
				os.Exit(0)
			}

		}
		for idx := range ping {
			yuan := init
			init += (ping[idx] % 7)
			init = init % 7
			diff[yuan-init+6] = 1
			if checkmonth(diff) {
				print("okokokokok")
				os.Exit(0)
			}

		}
		for idx := range run {
			yuan := init
			init += (ping[idx] % 7)
			init = init % 7
			diff[yuan-init+6] = 1
			if checkmonth(diff) {
				print("okokokokok")
				os.Exit(0)
			}

		}
		week[init] = 1
	}
}
func readLineInt(num int) []int {
	in := make([]int, 0, num)
	var d int
	for i := 0; i < num; i++ {
		fmt.Scan(&d)
		in = append(in, d)
	}
	return in
}

func checkweek(week [7]int) bool {
	b := true
	for idx := range week {
		if week[idx] == 0 {
			b = false
		}
	}
	return b
}

func checkmonth(week [13]int) bool {
	fmt.Println(week)
	b := true
	for idx := range week {
		if week[idx] == 0 {
			b = false
		}
	}
	return b
}
